<!DOCTYPE html>
<html>
<head>
    <title>map的实现</title>
    <script src="../../src/array/reduce.js"></script>
</head>
<body>
    <script>
        var arr = [1, 2, 3, 4, 5];

        var result = reduce(arr, function(res, value) {
            return res + value
        }, 0);
        console.log(result)
    </script>
</body>
</html>